<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <title>公寓管理系统-用户管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <script src="/static/js/jquery-3.5.1.min.js"></script>
    <script src="/static/js/bootstrap.min.js"></script>
</head>

<body>


</body>
<div class="container">
    <table class="table table-hover">
        <thead>
        <tr>
            <th>合同号#</th>
            <th>用户</th>
            <th>房间号</th>
            <th>入住时间</th>
            <th>离开时间</th>
            <th>预约创建时间</th>
            <th>预付金额</th>
            <th>支付状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            {% for contract in usercontracts %}
            <th>{{ contract.contractId }}</th>
            <td>{{ request.user.username }}</td>
            <td>{{ contract.room_id }}</td>
            <td>{{ contract.inTime }}</td>
            <td>{{ contract.outTime }}</td>
            <td>{{ contract.createTime }}</td>
            <td>{{ contract.rPay }}</td>
            <td>{{ contract.get_payState_display }}</td>
            <td><a href="{% url 'iframe_api:contract' %}?contractId={{ contract.contractId }}" id="pay"
                   class="btn btn-success btn-xs" role="button">查看详情</a></td>
            {% endfor %}
        </tr>
        </tbody>
    </table>
</div> <!-- /container -->
</html>